#ifndef COMDIALOG_H
#define COMDIALOG_H

#include <QDialog>
#include "serialconnection.h"

// Define PortSettings here
#define     COMPORT             "COM1"
#define     BAUDRATE            BAUD57600
#define     FLOWCONTROL         FLOW_OFF
#define     PARITY              PAR_NONE
#define     DATABITS            DATA_8
#define     STOPBITS            STOP_1
#define     PORT_TIMEOUT        50

namespace Ui {
    class COMDialog;
}

class COMDialog : public QDialog
{
    Q_OBJECT

public:
    explicit COMDialog(SerialConnection *ser, QWidget *parent = 0);
    ~COMDialog();
    void setButton();
    void refreshComports();

private:
    Ui::COMDialog *ui;
    SerialConnection *ser;

private slots:
    void on_pushButton_disconnect_clicked();
    void on_pushButton_connect_clicked();
};

#endif // COMDIALOG_H
